package demoList;

public class Test {

    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.addFirst(1);
        mySingleList.addFirst(2);
        mySingleList.addFirst(3);
        mySingleList.addFirst(4);



        MySingleList.ListNode ret = mySingleList.middleNode1();
        System.out.println(ret.val);


    }
    public static void main1(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.creatList();
        mySingleList.printList();
        System.out.println("===================");
//        mySingleList.printList();
//        System.out.println(mySingleList.size());
//        System.out.println(mySingleList.contains(45));
//        mySingleList.addFirst(99);
//        mySingleList.printList();
//        mySingleList.addLast(11);
//        mySingleList.printList();
//        mySingleList.addIndex(77,3);
//        mySingleList.printList();
//        mySingleList.delIndex(77);
//        mySingleList.printList();
//        mySingleList.printList();
//        mySingleList.removeAllKey(34);
//        mySingleList.printList();
//        System.out.println("==========删除=========");
//        mySingleList.clear();
        MySingleList.ListNode ret = mySingleList.reverseList();
        mySingleList.printList();
        mySingleList.printList(ret);
    }
}
